package tangyaxin.www.saoerweima;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.Toast;

import util.SegmentedBar;

/**
 * Created by Administrator on 2016/6/13.
 */
public class ActivityTest extends Activity {
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_test);
//        SharedPreferences sharedPreferences=getSharedPreferences("Text",MODE_PRIVATE);
//        SharedPreferences.Editor editor=sharedPreferences.edit();
//        editor.putInt("one",10);
//        editor.putString("two","aha ");
//        editor.commit();
//        int a=sharedPreferences.getInt("one",0);
//        String b=sharedPreferences.getString("two","null");
//        Toast.makeText(this,"配置了"+a+b+"效果",Toast.LENGTH_LONG).show();
//    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        ((SegmentedBar)findViewById(R.id.segmentbar)).setSegmentInfo(new String[]{"哈哈", "哈哈"}, new SegmentedBar.OnSegmentCheckedChangeListener() {
            @Override
            public void onSegmentCheckedChanged(SegmentedBar segmentedBar, int position, RadioButton segmentButton) {
                switch (position){

                    case 0:

                        break;
                    case 1:

                        break;
                    case 2:

                        break;

                }
            }
        });
    }
}
